/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pclong.config.entity;

import java.util.Date;
import java.util.UUID;

/**
 *
 * @author long@7road.com
 */
public class BulletinConfigEntity {
    
     
        ///  Gets or sets the id of the bulletin.
       
        public String Id ;

        
        ///  Gets or sets the type of the bulletin.
       
        public BulletinType Type ;

        
        ///  Gets or sets the link detail of the bulletin.
       
        public LinkWithTitleConfigEntity Link ;

        
        ///  Gets or sets a boolean value indicating whether to set red title or not.
       
        public boolean Red ;

        
        ///  Gets or sets a boolean value indicating whether to set to top or not.
       
        public boolean Top ;

        
        ///  Gets or sets a boolean value indicating whether to show the bulletin or not.
       
        public boolean Visible ;

        
        ///  Gets or sets the editor of the bulletin.
       
        public String Editor ;

        
        ///  Gets or sets the date of editing bulletin.
        
        public Date EditDate ;

        
        /// 
       
        public BulletinConfigEntity()
        {
            Id = UUID.randomUUID().toString();
            Type = BulletinType.News;
            Link = new LinkWithTitleConfigEntity();
            Red = false;
            Top = false;
            Visible = true;
            Editor = "";
            EditDate = new Date(System.currentTimeMillis());
        }

        
        /// Just for sorting.
       
        /// <param name="other"></param>
        /// <returns></returns>
//        public int CompareTo(BulletinConfigEntity other)
//        {
//            int val = this.Top.CompareTo(other.Top);
//
//            if (val == 0)
//                val = this.Red.CompareTo(other.Red);
//
//            if (val == 0)
//                val = this.EditDate.CompareTo(other.EditDate);
//
//            return val;
//        }
        
}
